projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70fa05a
)
Protect against integer overflow in division.
author
robertl
<robertl>
Wed, 3 Dec 2003 00:12:19 +0000
(
00:12
+0000)
committer
robertl
<robertl>
Wed, 3 Dec 2003 00:12:19 +0000
(
00:12
+0000)
jeeps/gpsmath.c
patch
|
blob
|
history
diff --git
a/jeeps/gpsmath.c
b/jeeps/gpsmath.c
index 9e0bdf802c802bfde1b082db9e98fc94d293c8d7..e3a9284a77cd4acc6f0e6f0171eba3d51f7790d0 100644
(file)
--- a/
jeeps/gpsmath.c
+++ b/
jeeps/gpsmath.c
@@
-266,7
+266,7
@@
int32 GPS_Math_Deg_To_Semi(double v)
double GPS_Math_Semi_To_Deg(int32 v)
{
- return
v / (double) ((1U<<31) *
180);
+ return
(double) (((double)v/(double)(1U<<31)) * (double)
180);
}